#ifndef INCLUDE_ROBOS_SHM_HPP
#define INCLUDE_ROBOS_SHM_HPP

#include <robos/base.hpp>

namespace robos{

  class Shm : public Base{
 public:
    Shm();
    virtual ~Shm();

    key_t getKey();
    size_t getSize();
    uint8_t* getMemoryStart();
    uint8_t* getMemoryEnd();
    int32_t getMemoryID();

    int32_t request(const key_t, const size_t);
    
    std::ostream& print(std::ostream&) const;
 private:
    key_t      m_key;
    size_t     m_size;
    uint8_t*   p_memoryStart;
    uint8_t*   p_memoryEnd;
    int32_t    m_shmId;
  };
  
}

#endif
